﻿namespace AppLab.Web
{
    using System;
    using System.ComponentModel.DataAnnotations;
    using System.Data;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using AppLab.Data.Models;
    using AppLab.Web.Resources;
    using Wicresoft.AppFlow.Flows;

    public class FormData
    {
        #region 表单field
        string MobileBrandAndType;
        string submitBy;
        DateTime submitTime;
        string submitTimeString;
        string submitType;
        string submitComment;
        string submitPackage;
        string submitReleaseNote;
        string submitSelfTest;
        string submitAnythingElse;
        #endregion

        #region 表单是否有其他报告 
        
        [Display(AutoGenerateField = false)]
        public bool AnythingElse { get; set; }

        #endregion

        #region 表单字段
        /// <summary>
        /// 手机
        /// </summary>
        [Display(Order = 0, Name = "ReviewCustomDataFormMoblieBrandAndTypeByLable", ResourceType = typeof(RegistrationDataResources))]
        public string MoblieBrandAndType { get { return MobileBrandAndType; } set { MobileBrandAndType = value; } }
        /// <summary>
        /// 提交人
        /// </summary>
        [Display(Order = 1, Name = "ReviewCustomDataFormSubmitByLable", ResourceType = typeof(RegistrationDataResources))]
        public string SubmitBy { get { return submitBy; } set { submitBy = value; } }
        /// <summary>
        /// 时间
        /// </summary>
        [Display(AutoGenerateField = false)]
        public DateTime SubmitTime { get { return submitTime; } set { submitTime = value; } }
        [Display(Order = 2, Name = "ReviewCustomDataFormSubmitTimeLable", ResourceType = typeof(RegistrationDataResources))]
        public string SubmitTimeString { get { return SubmitTime.ToString("yyyy-MM-dd HH:mm"); } set { submitTimeString = value; } }
        /// <summary>
        /// 类型
        /// </summary>
        [Display(Order = 3, Name = "ReviewCustomDataFormSubmitTypeLable", ResourceType = typeof(RegistrationDataResources))]
        public string SubmitType { get { return submitType; } set { submitType = value; } }
        /// <summary>
        /// 包
        /// </summary>
        [Display(Order = 4, Name = "ReviewCustomDataFormSubmitPackageLable", ResourceType = typeof(RegistrationDataResources))]
        public string SubmitPackage { get { return submitPackage; } set { submitPackage = value; } }
        /// <summary>
        /// 升级包
        /// </summary>
        //[Display(Order = 5, Name = "ReviewCustomDataFormSubmitUpgradePackageLable", ResourceType = typeof(RegistrationDataResources))]
        //public string SubmitUpgradePackage { get { return submitUpgradePackage; } set { submitUpgradePackage = value; } }
        /// <summary>
        /// Release Note
        /// </summary>
        [Display(Order = 6, Name = "ReviewCustomDataFormSubmitReleaseNoteLable", ResourceType = typeof(RegistrationDataResources))]
        public string SubmitReleaseNote { get { return submitReleaseNote; } set { submitReleaseNote = value; } }
        /// <summary>
        ///  自测报告
        /// </summary>
        [Display(Order = 7, Name = "ReviewCustomDataFormSubmitSelfTestLable", ResourceType = typeof(RegistrationDataResources))]
        public string SubmitSelfTest { get { return submitSelfTest; } set { submitSelfTest = value; } }
        ///// <summary>
        /////  验收报告
        ///// </summary>
        //[Display(Order = 7, Name = "ReviewCustomDataFormInspectionReportLable", ResourceType = typeof(RegistrationDataResources))]
        //public string InspectionReport { get { return inspectionReport; } set { inspectionReport = value; } }
        /// <summary>
        ///  其他文件
        /// </summary>
        [Display(Order = 9, Name = "ReviewCustomDataFormSubmitAnythingElseLable", ResourceType = typeof(RegistrationDataResources))]
        public string SubmitAnythingElse { get { return submitAnythingElse; } set { submitAnythingElse = value; } }
        /// <summary>
        /// 备注
        /// </summary> 
        [Display(Order = 10, Name = "ReviewCustomDataFormSubmitCommentLable", ResourceType = typeof(RegistrationDataResources))]
        public string SubmitComment { get { return submitComment; } set { submitComment = value; } }
        #endregion

        #region 公用字段
        [Key]
        [Display(AutoGenerateField = false)]
        public Guid FlowGuid { get; set; }

        [Display(AutoGenerateField = false)]
        public string MobileBrand { get; set; }

        [Display(AutoGenerateField = false)]
        public string MobileType { get; set; }

        [Display(AutoGenerateField = false)]
        public string SubmitByAlias { get; set; }

        [Display(AutoGenerateField = false)]
        public string MobileVersion { get; set; }

        [Display(AutoGenerateField = false)]
        public string ReviewBy { get; set; }

        [Display(AutoGenerateField = false)]
        public DateTime ReviewTime { get; set; }
    
        [Display(AutoGenerateField = false)]
        public string AssignedTo { get; set; }

        [Display(AutoGenerateField = false)]
        public int MediaClientID { get; set; }

        [Display(AutoGenerateField = false)]
        public Guid RowGuid { get; set; }
        #endregion
    }
}